﻿<?xml version="1.0" encoding="utf-8" ?>
<Vulcan xmlns="http://tempuri.org/vulcan2.xsd">
  <Connections>
    <Connection Name="TestConnection1" Type="OleDB" />
  </Connections>
  <Packages> 
    <Package Name="TestPrincipal" Type="Principal">
      <Tasks>
        <ExecuteSQL Name="CreatePrincipal" ConnectionName="TestConnection1">
          <Query QueryType="Standard">
            <Body>
              IF NOT EXISTS (SELECT * FROM sys.server_principals WHERE name = N'TestSqlUser')
              CREATE LOGIN [TestSqlUser] WITH PASSWORD=N'TestSqlUser'

              IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'TestSqlUser')
              CREATE USER [TestSqlUser] FOR LOGIN [TestSqlUser]
            </Body>
          </Query>
        </ExecuteSQL>
      </Tasks>
    </Package>
  </Packages>
</Vulcan>